/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package Current;

import java.io.Serializable;

/**
 * @author Fork
 */
public enum ClassDT implements Serializable, Cloneable {

    FIGHTER("Offense", 5),
    CLERIC("Defense", 5),
    THIEF("Income", 5),
    ASSASSIN("Intelligence", 5);

    private final String boostedStat;
    private final int boost;

    ClassDT(String boostedStat, int boost) {
        this.boostedStat = boostedStat;
        this.boost = boost;
    }

    int getBoost() {
        return boost;
    }

    String getBoostedStat() {
        return boostedStat;
    }

    boolean isFighter() {
        return (this == FIGHTER);
    }

    boolean isCleric() {
        return (this == CLERIC);
    }

    boolean isThief() {
        return (this == THIEF);
    }

    boolean isAssassin() {
        return (this == ASSASSIN);
    }

    public int offenseBoost() {
        if (this.isFighter()) {
            return this.getBoost();
        }
        return 0;
    }

    public int defenseBoost() {
        if (this.getBoostedStat().equals("Defense")) {
            return this.getBoost();
        }
        return 0;
    }

    public int spyOffenseBoost() {
        if (this.getBoostedStat().equals("Intelligence")) {
            return this.getBoost();
        }
        return 0;
    }

    public int spyDefenseBoost() {
        if (this.getBoostedStat().equals("Intelligence")) {
            return this.getBoost();
        }
        return 0;
    }

    public int wealthBonus() {
        if (this.getBoostedStat().equals("Income")) {
            return this.getBoost();
        }
        return 0;
    }

    @Override
    public String toString() {
        if (this.isFighter()) {
            return "Fighter";
        }
        if (this.isCleric()) {
            return "Cleric";
        }
        if (this.isThief()) {
            return "Thief";
        }
        if (this.isAssassin()) {
            return "Assassin";
        } else {
            return ("Error");
        }
    }
}
